import React from 'react';
import { Breadcrumb } from 'antd';
import { useSelector } from 'react-redux';
import {HomeOutlined} from '@ant-design/icons'
import { gettext } from '../utils/tools';

function Mybread(props: any) {
    var keyPath = useSelector((state: any) => state.keyPath)
    return (
        <div>
            <Breadcrumb>
                <Breadcrumb.Item href="">
                 <HomeOutlined/>首页
                </Breadcrumb.Item>
                {keyPath.map((item: any, index: number) => {
                    return (
                        <Breadcrumb.Item href="" key={index}>
                            {gettext(item)}                    
                        </Breadcrumb.Item>
                    )
                })
                }
            </Breadcrumb>
        </div>
    );
}

export default Mybread;